﻿<!--{include /service/service_head}-->

<!-- End #sidebar -->
	<div id="main-content">
		<!-- Main Content Section with everything -->

		<!-- Page Head -->
		
		<div>
			<form action="/service/accountManage.php" id="indexform" method="get">
				<select name="shop_id" class="small-input">
					<option value="0">選択してください</option>
					${Utility::Option(Utility::OptionArray($shopList, 'id', 'shop_name'), $defaultShopId)}
				</select>
				<select id="staff_id" name="staff_id" class="small-input">
		           	<option value="0">選択してください</option>
					${Utility::Option(Utility::OptionArray($staffList, 'id', 'family_name', 'personal_name'), $staffId)}
		        </select>
				<input type="submit" name="" value="検索" class="button"/>
			</form>
		</div>
		<!-- End .clear -->
		
		<div class="content-box">
			<!-- Start Content Box -->
			<div class="content-box-header">
				<h3>アカウント管理</h3>
				<ul class="content-box-tabs" style="display:none;">

					<li><a href="#tab1" class="default-tab">详细</a></li>
					<!-- href must be unique and match the id of target div -->
					<li><a href="#tab2">编辑</a></li>
				</ul>
				<div class="clear"></div>
			</div>
			<!-- End .content-box-header -->
			
			<div class="content-box-content">
				<form action="/service/accountManage.php" method="post">
				<input type="hidden" name="shop_id" value="{$defaultShopId}"/>
				<input type="hidden" name="staff_id" value="{$staffId}"/>
				<div class="tab-content default-tab" id="tab1">
					<!-- This is the target div. id must match the href of this div's tab -->
					<div class="table_box">
						<table>
						<tbody>
						<!--{loop $rightList $index $one}-->
							<tr>
								<td>
									{$index}
									<!--{if $userAuth[$one] > 0}-->
									<input type="checkbox" name="authIds[]" value="{$one}" checked="checked"/>
									<!--{else}-->
									<input type="checkbox" name="authIds[]" value="{$one}"/>
									<!--{/if}-->
								</td>
								<!--{loop $subRightList[$one] $index1 $one1}-->
								<td>
									{$index1}
									<!--{if $userAuth[$one1] > 0}-->
									<input type="checkbox" name="authIds[]" value="{$one1}" checked="checked"/>
									<!--{else}-->
									<input type="checkbox" name="authIds[]" value="{$one1}"/>
									<!--{/if}-->
								</td>
								<!--{/loop}-->
							</tr>
						<!--{/loop}-->
						</tbody>
						</table>
					</div>
					<p class="bottom_m"><input type="submit" class="button" value="setting" /></p>
					<p class="bottom_m"><a href="{$_SERVER['HTTP_REFERER']}">戻る</a></p>
					<div style="display:none">
						<table>
							<tr>
								<td colspan="7">
									<div class="pagination"> 
										<a href="#" title="First Page">&laquo; First</a>
										<a href="#" title="Previous Page">&laquo; Previous</a> 
										<a href="#" class="number" title="1">1</a> 
										<a href="#" class="number" title="2">2</a> 
										<a href="#" class="number current" title="3">3</a>
										 <a href="#" class="number" title="4">4</a> 
										 <a href="#" title="Next Page">Next &raquo;</a>
										 <a href="#" title="Last Page">Last &raquo;</a> </div>
									<!-- End .pagination -->
									<div class="clear"></div>
								</td>
							</tr>
						</table>
					</div>
				</div>
				</form>
			</div>
			<!-- End .content-box-content -->
		</div>

		<!-- End .content-box -->
		<!-- End .content-box -->
		<!-- End .content-box -->
		<div class="clear"></div>
		<!-- Start Notifications -->
		<!-- End Notifications -->
		<div id="footer"> <small>
			<!-- Remove this notice or replace it with whatever you want -->

			&#169; Copyright 2011 川崎エステ　エレガントリゾート　すべての女性を美しく幸せに | Powered by <a href="#">ZHONGHUA</a> | <a href="#">Top</a> </small> </div>
		<!-- End #footer -->
	</div>
	<!-- End #main-content -->
</div>

</body>
<!-- Download From www.exet.tk-->
</html>




<script type="text/javascript"> 
jQuery(function(){
	$("select[name='shop_id']").bind("change", function(){
		if( $(this).val() < 1 ){
			return ;
		}
		$.get("{$webRoot}/service/searchStaff.php", "shop_id=" + $(this).val(), function(data){
			
			var options = '<option value="0">選択してください</option>';
			if( data.error == 0 ){
				for(var index in data.data){
					if( !index ){
						continue;
					}
					options = options + '<option value="' + data.data[index].id + '">' + data.data[index].family_name + " " + data.data[index].personal_name + '</option>';
					
				}
			}
			$("#staff_id").html(options);
		}, "json");
		
	});
	$("select[name='staff_id']").bind("change", function(){
		
		$("#indexform").submit();
	});
});
</script>